package com.systemmanger.service;

import com.bean.WmsTGroup;
import com.bean.WmsTPermission;
import com.bean.WmsTUG;
import com.bean.WmsTUser;
import com.systemmanger.mapper.UserMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * @AUTHOR(闫晨航)
 * @date2021-12-06 15:54
 */
@Service
public class UserService {
    @Autowired
    UserMapper userMapper;
    public List<WmsTUser> getAllUsers() {
        return userMapper.getAllUsers();
    }

    public List<WmsTUser> getUsers(Map<String, Object> map) {
        return userMapper.getUsers(map);
    }

    public void delByUserId(String userID) {
        userMapper.delByUserId(userID);
    }

    public WmsTUser getuserByUserId(String userID) {
        return userMapper.getuserByUserId(userID);
    }

    public void updateByUser(WmsTUser wmsTUser) {
        userMapper.updateByUser(wmsTUser);
    }

    public List<WmsTUG> getAllgroup() {
        return userMapper.getAllgroup();
    }

    public List<WmsTPermission> getAllPerm() {
        return userMapper.getAllPerm();
    }

    public WmsTPermission getOnePermByUid(String userID) {
        return userMapper.getOnePermByUid(userID);
    }

    public WmsTPermission getOnePermByPid(String permId) {
        return userMapper.getOnePermByPid(permId);
    }

    public WmsTGroup getOgroup(String permId) {
        return userMapper.getOgroup(permId);
    }

    public void updateugByGroupId(String groupId,String userId) {
        userMapper.updateugByGroupId(groupId,userId);
    }
}
